/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kedacom.demo.jmx.action;

import com.kedacom.demo.jmx.book.ExceptionUtil;
import com.kedacom.demo.jmx.book.RMIClientFactory;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;

/**
 *
 * @author Administrator
 */
public class PropertyManagerSetup {

    public PropertyManagerSetup() {

        try {

            MBeanServerConnection client = RMIClientFactory.getClient();

            ObjectName propertyName = new ObjectName("JMXBookAgent:name=property");



            client.createMBean("jmxbook.ch4.PropertyManager",
                    propertyName);

        }
        catch (Exception e) {

            ExceptionUtil.printException(e);

        }

    }

    public static void main(String args[]) {

        PropertyManagerSetup setup = new PropertyManagerSetup();

    }
}
